<template>
  <div class="details">
    <div   v-for="(item,index) in datalist" :key="index">
<!-- <img :src="datalist.actors.avatarAddress" alt="" class="aaa"> -->
   <!-- {{datalist.actors[index].avatarAddress}} -->
   <!-- {{item.actors[2].avatarAddress}} -->
   <!-- {{item}} -->
   <!-- {{item.name}} -->
   {{item.index}}
   <!-- {{item}} -->
   {{index}}
    </div>
     <!-- <span>{{datalist.name}}</span> -->
    <!-- <div>
      <div>
       
        <span>2d</span>
      </div>
      <div>{{datalist.category}}</div>
      <div>国家|100分钟</div>
      <div>最下面文字描述</div>
    </div> -->

    <!-- <div>
        <p>演职人员</p>
        <div>演职人员名字</div>
    </div>
    <div>
        <p>演职人员照片</p>
        <div>
            <img :src="" alt="">
        </div>
    </div> -->
  </div>
</template>
<script>
export default {
    data(){
        return {
            datalist:'',
            arr:'11'
        }
    },  
    mounted(){
        let id = this.$route.fullPath.split('/detail/')[1]
        let id2 = id.split('?')[0]
        console.log(this.arr)
        // console.log(id2)
        // let arr =''
        // console.log(id.split('=')[1])
        if(id.split('=')[1] === 'www'){
            this.arr =  this.$root.datalist
        }else{
            console.log('11111111')
            this.arr =  this.$root.datalist2
        }
        // console.log(this.arr)
        let c = this.arr.find(function(v,k){
            // console.log(v.filmId)
            return  id2 == v.filmId
        })
        console.log(c.actors,c.actors[0].avatarAddress,c.actors.avatarAddress)
        this.datalist = c
    }
};
</script>
<style scoped>
.aaa{
    height: 0.3rem;
    width: 0.3rem;
}
.details{
    font-size: 0.16rem;
}
</style>